import request from '@/utils/request'

// 查询销售出库列表
export function listChuku(query) {
  return request({
    url: '/xiaoshou/chuku/list',
    method: 'get',
    params: query
  })
}

// 查询销售出库详细
export function getChuku(id) {
  return request({
    url: '/xiaoshou/chuku/' + id,
    method: 'get'
  })
}

// 新增销售出库
export function addChuku(data) {
  return request({
    url: '/xiaoshou/chuku',
    method: 'post',
    data: data
  })
}

// 修改销售出库
export function updateChuku(data) {
  return request({
    url: '/xiaoshou/chuku',
    method: 'put',
    data: data
  })
}

// 删除销售出库
export function delChuku(id) {
  return request({
    url: '/xiaoshou/chuku/' + id,
    method: 'delete'
  })
}

export function addSaleOrder(data){
  return request({
      url: '/xiaoshou/salesOrder',
      method: 'post',
      data: data
    })
}

// 查询订单列表
export function listOrder(query) {
  return request({
    url: '/xiaoshou/salesOrder/list',
    method: 'get',
    params: query
  })
}
